package mysql

import "gorm.io/gorm"

type Sort struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)"`
}

func (s *Sort) SortAdd(db *gorm.DB) error {
	return db.Debug().Create(s).Error
}

func (s *Sort) SortById(db *gorm.DB, id int64) error {
	return db.Debug().Where("id = ?", id).First(s).Error
}
